package com.myaihui.service.impl;

import com.myaihui.UserRepository;
import com.myaihui.domain.User;
import com.myaihui.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2018/5/24
 * *******************************
 */
@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserRepository userRepository;

    @Override
    public User getById(String id) {
        return userRepository.findOne(id);
    }


    @Override
    public User getByName(String name) {
        return userRepository.findByName(name);
    }
}
